import { createRouter,createWebHistory,RouteRecordRaw } from "vue-router";

const routes:Array<RouteRecordRaw> = [
    {
        path:'/',
        component:()=> import('../pages/login.vue')
    },
    {
        path:'/home',
        component:()=> import('../pages/home.vue'),
        redirect:'/classManagement',
        children: [
            {
                path: "/classManagement",
                name: "ClassManagement",
                component: () => import('../components/ClassManagement.vue')
            },
            {
                path: "/studentManagement",
                name: "StudentManagement",
                component: () => import('../components/StudentManagement.vue')
            },
            {
                path: "/teacherManagement",
                name: "TeacherManagement",
                component: () => import('../components/TeacherManagement.vue')
            },
            {
                path: "/schoolManagement",
                name: "SchoolManagement",
                component: () => import('../components/SchoolManagement.vue')
            },
            {
                path: "/teacher",
                name: "teacher",
                component: () => import('../components/teacher.vue')
            },
            {
                path: "/newPage",
                name: "newPage",
                component: () => import('../components/newPage.vue')
            },
        ]
    },
]
const route = createRouter({
    history:createWebHistory(),
    routes
})
export default route
